<?php
    /*session_name('SESID');
    session_set_cookie_params(0, '/', '.taoviec.com');*/
       
    session_start();        
    error_reporting(E_ALL & ~E_DEPRECATED);
   // error_reporting(0);

    function getSubDomain()
    {
        $path = $_SERVER['HTTP_HOST'];
        if (strpos($path,'.')!=FALSE)
        {
            $path = explode('.',$path);
            $path = $path[0];
        }
        else $path='';
        return $path;
    }

    $yii = dirname(__FILE__).'/../framework/yii.php';
    //echo $yii;die;
    $domain = getSubDomain();
    if($domain!='' && $domain!='taoviec'){        
        $config = dirname(__FILE__).'/protected/condb_member/condb.php'; 
    } else {
        $config = dirname(__FILE__).'/protected/condb/condb.php'; 
    }    

//    defined('YII_DEBUG') or define('YII_DEBUG', false);
    require_once($yii);
    Yii::createWebApplication($config)->run();
?>